import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

/**
 * Write a description of class Tesoros here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class Tesoros extends Bonus
{
    /**
     * Act - do whatever the Tesoros wants to do. This method is called whenever
     * the 'Act' or 'Run' button gets pressed in the environment.
     */
    public void act() 
    {
        // Add your action code here.
        Actor stickman= getOneIntersectingObject(Stickman.class);    
         if(stickman!=null){ 
            World aux=getWorld();
             getWorld().addObject(new Animaciones(6), getX()+10, getY()-5);           
             ((StickmanWorld)aux).creaLetrero(9,2);
        }
        move(1);
    }    
}
